<?php

namespace App\Repositories\Eloquent\Admin;

use App\Repositories\Eloquent\BaseModel;
use EasySwoole\ORM\AbstractModel;


class AdminRolePartModel extends AbstractModel
{
    use BaseModel;
    protected $tableName = 'k_admin_role_party';
    protected $connectionName = 'wr';
    protected $autoTimeStamp = true;
    protected $createTime = 'add_time';
    protected $updateTime = 'update_time';


    //删除用户角色
    public function delRoleByAdminId(int $adminId = 0){
        return $this->create()->destroy(['id_admin'=>$adminId]);
    }

}